package top.melody.ecommerce.platform.props;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Date: 15-1-15 下午3:26
 *
 * @Auther: <a mailto:xuyongming@milipp.com>Xu Yongming</a>
 * desc:
 */
@Component("global")
public class GlobalConfig {
    @Value("${sms.code.refresh.seconds}")
    public int smsCodeRefresh;
    @Value("${sms.code.min}")
    private int smsCodeBottom;
    @Value("${sms.code.max}")
    private int smsCodeTop;
    @Value("${file.upload.path}")
    private String fileRootPath;
    @Value("${file.server}")
    private String fileServer;
    //图片域名
    @Value("${img.domain}")
    private String imgDomain;
    //商品加入购物车最长时间未生成订单自动取消，单位s(秒)
    @Value("${lock.goods.trolley.max.time}")
    private int goodsInTrolleyMaxTime;
    //订单未支付,最长时间后自动取消，时间单位s(秒)
    @Value("${lock.order.cancel.max.time}")
    private int orderAutoCancelMaxTime;
    @Value("${timer.shopcart.corn.expression}")
    private String shopCartCornExpression;
    @Value("${timer.order.corn.expression}")
    private String orderCornExpression;
    @Value("${account.default.portrait}")
    private String defaultPortrait;

    public int getSmsCodeRefresh() {
        return smsCodeRefresh;
    }

    public void setSmsCodeRefresh(int smsCodeRefresh) {
        this.smsCodeRefresh = smsCodeRefresh;
    }

    public int getSmsCodeBottom() {
        return smsCodeBottom;
    }

    public void setSmsCodeBottom(int smsCodeBottom) {
        this.smsCodeBottom = smsCodeBottom;
    }

    public int getSmsCodeTop() {
        return smsCodeTop;
    }

    public void setSmsCodeTop(int smsCodeTop) {
        this.smsCodeTop = smsCodeTop;
    }

    public String getFileRootPath() {
        return fileRootPath;
    }

    public void setFileRootPath(String fileRootPath) {
        this.fileRootPath = fileRootPath;
    }

    public String getFileServer() {
        return fileServer;
    }

    public void setFileServer(String fileServer) {
        this.fileServer = fileServer;
    }

    public String getImgDomain() {
        return imgDomain;
    }

    public void setImgDomain(String imgDomain) {
        this.imgDomain = imgDomain;
    }

    public int getGoodsInTrolleyMaxTime() {
        return goodsInTrolleyMaxTime;
    }

    public void setGoodsInTrolleyMaxTime(int goodsInTrolleyMaxTime) {
        this.goodsInTrolleyMaxTime = goodsInTrolleyMaxTime;
    }

    public int getOrderAutoCancelMaxTime() {
        return orderAutoCancelMaxTime;
    }

    public void setOrderAutoCancelMaxTime(int orderAutoCancelMaxTime) {
        this.orderAutoCancelMaxTime = orderAutoCancelMaxTime;
    }

    public String getShopCartCornExpression() {
        return shopCartCornExpression;
    }

    public void setShopCartCornExpression(String shopCartCornExpression) {
        this.shopCartCornExpression = shopCartCornExpression;
    }

    public String getOrderCornExpression() {
        return orderCornExpression;
    }

    public void setOrderCornExpression(String orderCornExpression) {
        this.orderCornExpression = orderCornExpression;
    }

    public String getDefaultPortrait() {
        return defaultPortrait;
    }

    public void setDefaultPortrait(String defaultPortrait) {
        this.defaultPortrait = defaultPortrait;
    }
}
